package leetcode.dp;

public class step {
    private static int process(int aim) {
        if (aim < 1) {
            return 0;
        }
        if (aim == 1 || aim == 2) {
            return aim;
        }
        int res = 2;
        int pre = 1;
        int temp = 0;
        for (int i = 3; i <= aim; i++) {
            temp = res;
            res = res + pre;
            pre = temp;
        }
        return res;
    }
}
